<?
function get_ip() {

	$ip = "";
	$html = implode('', file('http://www.whatismyip.com/'));
	$fragmento = strstr($html, 'Your IP Is');
	$pos = strpos($fragmento, '</h1>');
	$ip = trim(substr($fragmento, 10,$pos-10));
	return $ip;
	
}	
?>